.class Lcom/waiqin365/lightapp/visit/gx;
.super Landroid/os/Handler;


# instance fields
.field private a:Ljava/lang/ref/WeakReference;


# direct methods
.method public constructor <init>(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;)V
    .locals 1

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/visit/gx;->a:Ljava/lang/ref/WeakReference;

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 8

    const/4 v3, 0x1

    const v7, 0x7f08013b

    const/4 v4, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightapp/visit/gx;->a:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    invoke-virtual {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->dismissProgressDialog()V

    iget v1, p1, Landroid/os/Message;->what:I

    sparse-switch v1, :sswitch_data_0

    goto :goto_0

    :sswitch_0
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Lcom/waiqin365/lightapp/visit/a/a/bg;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/visit/a/a/bg;->b()Z

    move-result v2

    if-eqz v2, :cond_10

    iget-object v2, v1, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    if-nez v2, :cond_b

    invoke-virtual {v0, v7}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto :goto_0

    :sswitch_1
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Lcom/waiqin365/lightapp/visit/a/a/be;

    iget-object v2, v1, Lcom/waiqin365/lightapp/visit/a/a/be;->c:Ljava/lang/String;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/visit/a/a/be;->b()Z

    move-result v3

    if-eqz v3, :cond_3

    const-string/jumbo v3, "1"

    iget-object v1, v1, Lcom/waiqin365/lightapp/visit/a/a/be;->b:Ljava/lang/String;

    invoke-virtual {v3, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->back()V

    goto :goto_0

    :cond_1
    if-eqz v2, :cond_2

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_14

    :cond_2
    invoke-virtual {v0, v7}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    :goto_1
    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto :goto_0

    :cond_3
    if-eqz v2, :cond_4

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_5

    :cond_4
    invoke-virtual {v0, v7}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->getString(I)Ljava/lang/String;

    :cond_5
    iget v1, v1, Lcom/waiqin365/lightapp/visit/a/a/be;->a:I

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;I)V

    goto :goto_0

    :sswitch_2
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Lcom/waiqin365/lightapp/visit/a/a/bj;

    iget-object v2, v1, Lcom/waiqin365/lightapp/visit/a/a/bj;->c:Ljava/lang/String;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/visit/a/a/bj;->b()Z

    move-result v3

    if-eqz v3, :cond_8

    const-string/jumbo v3, "1"

    iget-object v5, v1, Lcom/waiqin365/lightapp/visit/a/a/bj;->b:Ljava/lang/String;

    invoke-virtual {v3, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_6

    iget-object v1, v1, Lcom/waiqin365/lightapp/visit/a/a/bj;->d:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->b(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;Ljava/lang/String;)Ljava/lang/String;

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->d(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;)Lcom/waiqin365/lightapp/view/CustomerSelectMultView;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->h(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/waiqin365/lightapp/view/CustomerSelectMultView;->setEnableIds(Ljava/lang/String;)V

    goto/16 :goto_0

    :cond_6
    if-eqz v2, :cond_7

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_13

    :cond_7
    invoke-virtual {v0, v7}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    :goto_2
    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    :cond_8
    if-eqz v2, :cond_9

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_a

    :cond_9
    invoke-virtual {v0, v7}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->getString(I)Ljava/lang/String;

    :cond_a
    iget v1, v1, Lcom/waiqin365/lightapp/visit/a/a/bj;->a:I

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;I)V

    goto/16 :goto_0

    :cond_b
    iget-object v2, v1, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v2, v2, Lcom/waiqin365/lightapp/visit/b/bv;->b:Ljava/lang/String;

    const-string/jumbo v5, "1"

    iget-object v6, v1, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v6, v6, Lcom/waiqin365/lightapp/visit/b/bv;->a:Ljava/lang/String;

    invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_e

    iget-object v2, v1, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v2, v2, Lcom/waiqin365/lightapp/visit/b/bv;->d:Ljava/lang/String;

    invoke-static {v2, v4}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/String;I)I

    move-result v2

    if-lez v2, :cond_12

    iget-object v2, v1, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v2, v2, Lcom/waiqin365/lightapp/visit/b/bv;->f:Ljava/util/List;

    if-eqz v2, :cond_12

    iget-object v1, v1, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v1, v1, Lcom/waiqin365/lightapp/visit/b/bv;->f:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_c
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_12

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/lightapp/visit/b/bn;

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->i(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;)Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;

    move-result-object v5

    invoke-virtual {v5}, Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;->e()Lcom/waiqin365/lightapp/kehu/b/am;

    move-result-object v5

    iget-object v5, v5, Lcom/waiqin365/lightapp/kehu/b/am;->a:Ljava/lang/String;

    iget-object v1, v1, Lcom/waiqin365/lightapp/visit/b/bn;->h:Ljava/lang/String;

    invoke-virtual {v5, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_c

    move v1, v3

    :goto_3
    if-eqz v1, :cond_d

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->f(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;)Lcom/waiqin365/lightapp/view/DateViewNoClear_vertical;

    move-result-object v2

    const v5, 0x7f080222

    invoke-virtual {v0, v5}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v2, v5}, Lcom/waiqin365/lightapp/view/DateViewNoClear_vertical;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->e(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;)Lcom/waiqin365/lightapp/view/EmployeeSelectView_Vertical;

    move-result-object v2

    invoke-virtual {v2}, Lcom/waiqin365/lightapp/view/EmployeeSelectView_Vertical;->e()Lcom/waiqin365/lightapp/kehu/share/a/c;

    move-result-object v2

    iget-object v2, v2, Lcom/waiqin365/lightapp/kehu/share/a/c;->b:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const v2, 0x7f08029e

    invoke-virtual {v0, v2}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    new-array v3, v3, [Ljava/lang/Object;

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->i(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;)Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;

    move-result-object v5

    invoke-virtual {v5}, Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;->e()Lcom/waiqin365/lightapp/kehu/b/am;

    move-result-object v5

    iget-object v5, v5, Lcom/waiqin365/lightapp/kehu/b/am;->d:Ljava/lang/String;

    aput-object v5, v3, v4

    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    :cond_d
    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->j(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;)Lcom/waiqin365/lightapp/visit/b/bn;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->a(Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;Lcom/waiqin365/lightapp/visit/b/bn;)V

    goto/16 :goto_0

    :cond_e
    if-eqz v2, :cond_f

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_11

    :cond_f
    invoke-virtual {v0, v7}, Lcom/waiqin365/lightapp/visit/VisitNewPlanActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    :goto_4
    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    :cond_10
    iget v1, v1, Lcom/waiqin365/lightapp/visit/a/a/bg;->a:I

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;I)V

    goto/16 :goto_0

    :cond_11
    move-object v1, v2

    goto :goto_4

    :cond_12
    move v1, v4

    goto :goto_3

    :cond_13
    move-object v1, v2

    goto/16 :goto_2

    :cond_14
    move-object v1, v2

    goto/16 :goto_1

    :sswitch_data_0
    .sparse-switch
        0x1 -> :sswitch_0
        0x6 -> :sswitch_1
        0x8 -> :sswitch_2
    .end sparse-switch
.end method
